package com.aop.controller;

import com.validate.annotation.MyValidate;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/aop")
public class AopController {
    @GetMapping("/hello")
    public String hello() {
        System.out.println("hello world");
        return "hello world";
    }

    @MyValidate
    @GetMapping("/annotation")
    public String annotation() {
        System.out.println("my annotation");
        return "my annotation";
    }
}
